package com.musicstore.web.controller;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

import javax.servlet.http.HttpServletResponse;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.musicstore.biz.AlbumBiz;
import com.musicstore.entity.AlbumEntity;

@Controller
public class AJAXJsonController {
	@Autowired
	private AlbumBiz albumBiz;
	
	@RequestMapping("/getAlbum")
	@ResponseBody
	public AlbumEntity getAlbum(){
		return albumBiz.getById(1);
	}
	
	@RequestMapping("/getList")
	@ResponseBody
	public List<AlbumEntity> getList(){
		return albumBiz.getAlbumTitle("", 0, 9);
	}
}
